package com.wyl.niupi.config;

import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.stereotype.Component;

/**
 * @author 吴宇亮 on 2020/11/27 13:22
 */
@Component
public class EmbeddedTomcatConfig implements WebServerFactoryCustomizer<TomcatServletWebServerFactory> {
    @Override
    public void customize(TomcatServletWebServerFactory factory) {
        factory.addConnectorCustomizers(connector -> {
            System.out.println("EmbeddedTomcatConfig: " + connector.setProperty("relaxedQueryChars", "[]"));
        });
    }
}
